package com.example.helloworld

import android.os.Bundle
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView
import androidx.activity.ComponentActivity

class MainActivity : ComponentActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val textView = findViewById<TextView>(R.id.textView)
        val button = findViewById<Button>(R.id.button)
        val imageView = findViewById<ImageView>(R.id.imageView)

        // 设置当前国旗（系统会根据语言自动选择对应的flag.png）
        textView.text = getString(R.string.textView)

        button.setOnClickListener {
            textView.text = getString(R.string.clicked)
        }
    }
}